package cn.edu.fzu.homemaking.company.api;

import cn.edu.fzu.homemaking.company.domain.enums.DemandStatusEnum;
import cn.edu.fzu.homemaking.web.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

/**
 * @author wanjie
 * @version 1.0
 */
@FeignClient("user")
public interface UserApi {

    @GetMapping("/api/user/demand/list")
    Result list(@RequestParam("labelId") Long labelId, @RequestParam("startTime") String startTime,
                @RequestParam("startTime") String endTime, @RequestParam("address") String address,
                @RequestParam("status") DemandStatusEnum status, @RequestParam("pageNum") Integer pageNum,
                @RequestParam("pageSize") Integer pageSize);

    @PostMapping("/api/user/auth/demand/updateDemandStatus")
    Result updateDemandStatus(@RequestParam("id") Long id, @RequestParam("status") DemandStatusEnum status);


    @GetMapping("/api/user/demand/selectById")
    Result querySingleDemand(@RequestParam("id") Long id);

}
